home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
pswdprot
/
configur.frm
< prev
next >
Wrap
Text File
|
1995-05-07
|
6KB
|
208 lines
VERSION 2.00
Begin Form Configure
BackColor = &H00C0C0C0&
Caption = "Configure"
ClientHeight = 4065
ClientLeft = 4245
ClientTop = 3375
ClientWidth = 3705
Height = 4470
Left = 4185
LinkTopic = "Form1"
ScaleHeight = 4065
ScaleWidth = 3705
Top = 3030
Width = 3825
Begin SSPanel Panel3D6
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
Caption = "Time Interval"
Font3D = 0 'None
Height = 252
Left = 480
TabIndex = 11
Top = 480
Width = 1452
End
Begin TextBox Time_set
BackColor = &H00C0C0C0&
Height = 288
Left = 2040
TabIndex = 10
Top = 480
Width = 612
End
Begin SpinButton Spin1
Height = 252
Left = 2640
Top = 480
Width = 372
End
Begin SSPanel Panel3D5
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
Font3D = 0 'None
Height = 492
Left = 360
TabIndex = 9
Top = 360
Width = 2892
End
Begin SSCommand Command3D5
Caption = "Set Password..."
Enabled = 0 'False
Font3D = 0 'None
Height = 372
Left = 720
TabIndex = 8
Top = 1560
Width = 2172
End
Begin SSCheck Check3D1
Caption = "Password Protected"
Font3D = 0 'None
Height = 252
Left = 840
TabIndex = 7
Top = 1200
Width = 1932
End
Begin SSCommand Command3D4
Caption = "About..."
Font3D = 0 'None
Height = 492
Left = 1920
TabIndex = 6
Top = 3000
Width = 972
End
Begin SSCommand Command3D3
Caption = "Help..."
Font3D = 0 'None
Height = 492
Left = 720
TabIndex = 5
Top = 3000
Width = 972
End
Begin SSCommand Command3D2
Caption = "Cancel"
Font3D = 0 'None
Height = 492
Left = 1920
TabIndex = 4
Top = 2400
Width = 972
End
Begin SSCommand Command3D1
Caption = "OK"
Font3D = 0 'None
Height = 492
Left = 720
TabIndex = 3
Top = 2400
Width = 972
End
Begin SSPanel Panel3D3
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
Font3D = 0 'None
Height = 1332
Left = 360
TabIndex = 2
Top = 2280
Width = 2892
End
Begin SSPanel Panel3D2
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
Font3D = 0 'None
Height = 972
Left = 360
TabIndex = 1
Top = 1080
Width = 2892
End
Begin SSFrame Frame3D1
Font3D = 0 'None
Height = 3735
Left = 120
TabIndex = 0
Top = 120
Width = 3375
End
End
Sub Check3D1_Click (Value As Integer)
If (Value = -1) Then
command3d5.Enabled = True
Else
command3d5.Enabled = False
End If
End Sub
Sub Command3D1_Click ()
If (Val(time_set.Text) < 1) Then
time_set.Text = "1"
End If
A$ = "N"
If (CHECK3D1.Value = True) Then
A$ = "Y"
End If
'Write the directory of the Bit Maps
RESULT% = WritePrivateProfileString("PWSAMPLE", "PWProtected", A$, "CONTROL.INI")
RESULT% = WritePrivateProfileString("PWSAMPLE", "Timer Set", time_set.Text, "CONTROL.INI")
End
End Sub
Sub Command3D2_Click ()
End
End Sub
Sub Command3D3_Click ()
'HelpFilePath = "D:\PROGRAM\VB\PROJECTS\SCRNSVR\GIFSVR\SCRNSVR.HLP"
'R = WinHelp(Configure.hWnd, HelpFilePath, HELP_CONTENTS, 0)
End Sub
Sub Command3D4_Click ()
aboutbox.Show
End Sub
Sub Command3D5_Click ()
ChngPswdInst = Shell("C:\WINDOWS\SYSTEM\CHGPSWD.EXE")
End Sub
Sub Form_Load ()
A$ = Space$(50)
RESULT% = GetPrivateProfileString("PWSAMPLE", "PWProtected", "N", A$, 50, "CONTROL.INI")
If (Mid$(A$, 1, 1) = "Y") Then
CHECK3D1.Value = True
End If
If (CHECK3D1.Value = True) Then
command3d5.Enabled = True
Else
command3d5.Enabled = False
End If
A$ = Space$(3)
RESULT% = GetPrivateProfileString("PWSAMPLE", "Timer Set", " ", A$, 3, "CONTROL.INI")
time_set.Text = A$
If (RESULT% = 0) Then
time_set.Text = "1"
End If
End Sub
Sub Spin1_SpinDown ()
time_set.Text = Str$(Val(time_set.Text) - 1)
If (Val(time_set.Text) < 1) Then
time_set.Text = 1
End If
End Sub
Sub Spin1_SpinUp ()
time_set.Text = Str$(Val(time_set.Text) + 1)
End Sub